Closed Bug 1930777 Opened 7 months ago Closed 2 months ago

ruff: xpidl/header.py: Use `elif` instead of `else` then `if`, to reduce indentation

Categories

(Core :: XPCOM, task)

task

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: Sylvestre, Assigned: giulianoverrando, Mentored)

References

Details

(Keywords: good-first-bug, Whiteboard: [lang=python])

Attachments

(1 file)

Filling as a good first bug to learn workflows.

Use elif instead of else then if, to reduce indentation
https://searchfox.org/mozilla-central/source/xpcom/idl-parser/xpidl/header.py#85-89
https://searchfox.org/mozilla-central/source/xpcom/idl-parser/xpidl/header.py#149

As the change is trivial, it is just to learn how to contribute to Firefox.

Found by https://docs.astral.sh/ruff/rules/collapsible-else-if/

Tutorial to contribute:
https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
https://firefox-source-docs.mozilla.org/contributing/stack_quickref.html

Please don't ask for the bug to be assigned. It will be automatically assigned to the first patch.

Blocks: 1930778
No longer blocks: 1930778
Mentor: sledru
Keywords: good-first-bug
Whiteboard: [lang=python]
Assignee: nobody → giulianoverrando
Status: NEW → ASSIGNED
Component: Lint and Formatting → XPCOM
Product: Developer Infrastructure → Core

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: giulianoverrando → nobody
Status: ASSIGNED → NEW

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:giulianoverrando, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(sledru)
Flags: needinfo?(giulianoverrando)
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/028131817103 Changed `if` then `else` with `elif` to reduce indentation. r=sylvestre
Assignee: nobody → giulianoverrando
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
Flags: needinfo?(sledru)
Flags: needinfo?(giulianoverrando)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: